package p0;

public class Leetcode_70 {
    public int climbStairs(int n) {
        if (n <= 2) {
            return n;
        }
        int i1 = 1, i2 = 2;
        for (int i = 3; i <= n; i++) {
            int t = i1 + i2;
            i1 = i2;
            i2 = t;
        }
        return i2;
    }

    public static void main(String[] args) {
    }
}
